package test.y2020;

import cn.hutool.core.lang.Console;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Map;

/**
 * Created By  醉美柳舞之众星捧月
 *
 * @author songx
 * @date 2020/3/21 10:37
 */
public class March3 {
    public static void main(String[] args) {
        Map<String, Object> objectObjectHashMap = new HashMap<>(16);
        objectObjectHashMap.put("productCode", "lalalala");
        objectObjectHashMap.put("amountCent", "800");
        objectObjectHashMap.put("unAmountCent", "8000");
        objectObjectHashMap.put("resultMap", null);
        String s = JSONObject.toJSONString(objectObjectHashMap);
        Console.error(objectObjectHashMap);
        Console.error(s);
        HashMap hashMap = JSON.parseObject(s, HashMap.class);
        Console.error(hashMap);
        Console.error(hashMap.get("unAmountCent"));
        Console.error(hashMap.get("resultMap"));
    }
}